package za.ac.lance.config;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Bean;
import za.ac.lance.acyclicdependenciesprinciple.obeys.service.impl.GradeBookServiceImpl;
import za.ac.lance.composition.service.impl.AnimalServiceImpl;
import za.ac.lance.dependencyinversionprinciple.obeys.service.impl.WorkerServiceImpl;
import za.ac.lance.encapsulation.service.impl.PersonImpl;
import za.ac.lance.polymorphism.service.impl.BusinessLoanValidator;
import za.ac.lance.polymorphism.service.impl.PersonalLoanValidator;
import za.ac.lance.principleofleastknowledge.obeys.services.impl.MovementImpl;
import za.ac.lance.singleresponsibilityprinciple.obeys.service.impl.CalcImpl;

/**
 * File Name: Config.java
 * Version: 
 * Description: 
 * Package: za.ac.lance.config
 * Author: Lance
 * Date: Feb 29, 2012
 */
@Configurable
public class Config
{

    @Bean(name = "gradeBookService")
    public GradeBookServiceImpl provideGradeBookService()
    {
        return new GradeBookServiceImpl();
    }
    
    @Bean(name="personService")
    public PersonImpl providePersonService()
    {
        return new PersonImpl();
    }
    
    @Bean(name = "provideBusinessValidator")
    public BusinessLoanValidator provideBusinessLoanValidator()
    {
        return new BusinessLoanValidator();
    }

    @Bean(name = "providePersonalValidator")
    public PersonalLoanValidator providePersonalLoanValidator()
    {
        return new PersonalLoanValidator();
    }
    
    @Bean(name="animalService")
    public AnimalServiceImpl provideAnimalService()
    {
        return new AnimalServiceImpl();
    }
    
    @Bean(name="workerService")
    public WorkerServiceImpl provideWorkerService()
    {
        return new WorkerServiceImpl();
    }
    
    @Bean(name="animalServiceInheritance")
    public za.ac.lance.inheritance.service.impl.AnimalServiceImpl inheritanceService()
    {
        return new za.ac.lance.inheritance.service.impl.AnimalServiceImpl();
    }
    
    @Bean(name="movementService")
    public MovementImpl movementService()
    {
        return new MovementImpl();
    }
    
    @Bean(name="calculatorService")
    public CalcImpl calculatorService()
    {
        return new CalcImpl();
    }

    @Bean(name="animalServiceSAP")
    public za.ac.lance.stableabstractionsprinciple.obeys.service.impl.AnimalServiceImpl provideAnimalServiceSAP()
    {
        return new za.ac.lance.stableabstractionsprinciple.obeys.service.impl.AnimalServiceImpl();
    }
}
